home *** CD-ROM | disk | FTP | other *** search
- Path: news.nyu.edu!schonberg!dewar
- From: dewar@cs.nyu.edu (Robert Dewar)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Date: 8 Apr 1996 21:18:43 -0400
- Organization: Courant Institute of Mathematical Sciences
- Message-ID: <dewar.829012486@schonberg>
- References: <JSA.96Feb16135027@organon.com> <dewar.828879781@schonberg> <4k9qhe$65r@solutions.solon.com> <dewar.828936837@schonberg> <4kb2j8$an0@solutions.solon.com> <4kbrt5$k3h@mulga.cs.mu.OZ.AU>
- NNTP-Posting-Host: schonberg.cs.nyu.edu
- X-Newsreader: NN version 6.5.0 (NOV)
-
- Peter said
-
- ">Something which works only on some systems is
- >not a portability problem *if there is no standard saying it works*. Likewise
- > i = ++i;
- >producing different results on different machines is not a "portability
- >problem"."
-
- This is a perfect case of Peter saying: Language X ensures that all
- portable programs are portable, therefore there are no portability
- problems. This is of course vacuously true for all languages!
-
- By a "portability problem" most people mean that you take a program
- written in language X, and try to move it to machine Y from machine Z,
- and it does not work any more.
-
- Portability problems are most definitely caused by writing non-portable
- code. In fact in the absence of errors in the compiler of environment
- on machine Y or machine Z, this is the ONLY source of portability
- problems.
-
- However, it is definitely the case that languages vary in the ease with
- which people end up writing non-portable code deliberately or
- accidentally.
-
- For example, in C, we can't declare an integer variable without
- introducing a potential portability dpeendence on the range. Careful
- writing can get around this, or certainly minimize it, but it's often
- the source of porability problems. Typical Ada prograns do not suffer
- from this particular problem, because even a novice Ada programmer
- knows to avoid the use of predefined types in code that is intended
- to be portable.
-
-